home *** CD-ROM | disk | FTP | other *** search
/ Java Internet Programming Reference Guide / Java Internet Programming Reference Guide.iso / autorun / java.dir / 00200_15.txt < prev    next >
Encoding:
Text File  |  1996-01-12  |  23.7 KB  |  1,243 lines

  1. Objects
  2.  
  3.  
  4.  
  5. The following objects are available in JavaScript: 
  6. anchor applet button checkbox Date document form history link location      Math password radioButton reset selection string submit text textArea window 
  7.  
  8.  
  9.  
  10. NOTE: Each object topic indicates whether the object is part of the client (in Navigator), server (in LiveWire), or is common (built-in to JavaScript). Server objects are not included in this version of the documentation. 
  11. ------------------------------------------------------------------------
  12.  
  13.  
  14. anchor object (client)
  15.  
  16.  
  17.  
  18. An anchor is a piece of text identified as the target of a hypertext link. 
  19.  
  20. Syntax
  21.  
  22.  
  23.  
  24. To define an anchor, use standard HTML syntax : 
  25.  
  26.  
  27. <A NAME="anchorName"
  28.    anchorText
  29. <A>
  30.  
  31.  
  32.  
  33.  
  34. NAME specifies a tag that becomes an available hypertext target within the current document. 
  35. anchorText specifies the text to display at the anchor. 
  36.  
  37. Description
  38.  
  39.  
  40.  
  41. You can reference the anchor objects in your code by using the anchors property of the document object. The anchors property is an array that contains an entry for each anchor in a document. 
  42.  
  43. xxx to be supplied 
  44.  
  45. Properties
  46.  
  47. xxx to be supplied 
  48.  
  49. Methods
  50.  
  51. xxx to be supplied 
  52.  
  53. Event handlers
  54.  
  55.  
  56.  
  57. None. 
  58.  
  59. Examples
  60.  
  61.  
  62.  
  63.  
  64. <A NAME="javascript_intro"><H2>Welcome to JavaScript</H2></A>
  65.  
  66.  
  67.  
  68.  
  69.  
  70. See also
  71.  
  72. link object anchors property 
  73. ------------------------------------------------------------------------
  74.  
  75.  
  76. applet object (client)
  77.  
  78.  
  79.  
  80. Represents a Java applet. xxx NYI. 
  81.  
  82. Syntax
  83.  
  84.  
  85.  
  86. xxx to be supplied 
  87.  
  88. Description
  89.  
  90.  
  91.  
  92. The applet object executes applets written in Java, not JavaScript. Java applets execute only on Netscape 2.0 and HotJava, and only on 32-bit platforms, such as Windows 95, Windows NT, and Unix. They do not execute on the 16-bit Windows platforms, such as Windows 3.1. 
  93.  
  94. Properties
  95.  
  96. length 
  97.  
  98. Methods
  99.  
  100. xxx to be supplied 
  101.  
  102. Event handlers
  103.  
  104. xxx to be supplied 
  105.  
  106. Examples
  107.  
  108.  
  109.  
  110. xxx to be supplied 
  111.  
  112. See also
  113.  
  114. xxx to be supplied 
  115. ------------------------------------------------------------------------
  116.  
  117.  
  118. button object (client)
  119.  
  120.  
  121.  
  122. A button object is a pushbutton on an HTML form. 
  123.  
  124. Syntax
  125.  
  126.  
  127.  
  128.  
  129. <INPUT
  130.    TYPE="button"
  131.    NAME="objectName"
  132.    VALUE="buttonText"
  133.    [onClick="handlerText"]>
  134.  
  135.  
  136. NAME specifies the name of the button object as a property of the enclosing form object and can be accessed using the name property. VALUE specifies the label to display on the button face and can be accessed using the value property. 
  137.  
  138. Description
  139.  
  140.  
  141.  
  142. The button object is a custom button that you can use to perform an action you define. 
  143.  
  144. Properties
  145.  
  146. name value 
  147.  
  148. Methods
  149.  
  150. click 
  151.  
  152. Event handlers
  153.  
  154. onClick 
  155.  
  156. Examples
  157.  
  158.  
  159.  
  160. A custom button does not necessarily load a new page into the client; it merely executes the script specified by the onClick event handler. In the following example, myfunction() is a JavaScript function. 
  161.  
  162.  
  163. <INPUT TYPE="button" VALUE="Calculate" NAME="calc_button"
  164.    onClick="myfunction(this.form)">
  165.  
  166.  
  167.  
  168.  
  169.  
  170. See also
  171.  
  172. reset and submit objects 
  173. ------------------------------------------------------------------------
  174.  
  175.  
  176. checkbox object (client)
  177.  
  178.  
  179.  
  180. A checkbox object is a checkbox on an HTML form. A checkbox is a toggle switch that lets the user set a value on or off. 
  181.  
  182. Syntax
  183.  
  184.  
  185.  
  186. To define a checkbox, use standard HTML syntax with the addition of the onClick event handler: 
  187.  
  188. <INPUT
  189.    TYPE="checkbox"
  190.    NAME="objectName"
  191.    [CHECKED]
  192.    [onClick="handlerText"]>   textToDisplay
  193.  
  194.  
  195.  
  196.  
  197.  
  198. Description
  199.  
  200.  
  201.  
  202. Use the checked property to specify whether the checkbox is currently checked. Use the defaultChecked property to specify whether the checkbox is checked when the form is loaded. 
  203.  
  204. Properties
  205.  
  206. checked defaultChecked name value 
  207.  
  208. Methods
  209.  
  210. click 
  211.  
  212. Event handlers
  213.  
  214. onClick 
  215.  
  216. Examples
  217.  
  218.  
  219.  
  220.  
  221. <B>Specify your music preferences (check all that apply):</B>
  222. <BR><INPUT TYPE="checkbox" NAME="musicpref_rnb" CHECKED> R&B
  223. <BR><INPUT TYPE="checkbox" NAME="musicpref_jazz" CHECKED> Jazz
  224. <BR><INPUT TYPE="checkbox" NAME="musicpref_blues" CHECKED> Blues
  225. <BR><INPUT TYPE="checkbox" NAME="musicpref_newage" CHECKED> New Age
  226.  
  227.  
  228.  
  229.  
  230.  
  231. See also
  232.  
  233. xxx to be supplied 
  234. ------------------------------------------------------------------------
  235.  
  236.  
  237. Date object (common)
  238.  
  239.  
  240.  
  241. JavaScript has a date object that enables you to work with dates and times. JavaScript handles dates very similar to the way Java handles dates: They have many of the same date methods, and both languages store dates internally as the number of milliseconds since January 1, 1970 00:00:00. 
  242.  
  243. Syntax
  244.  
  245.  
  246.  
  247. To create a date object: 
  248.  
  249.  
  250. varName = new Date(parameters)
  251.  
  252.  
  253.  
  254. where varName is a JavaScript variable name for the date object being created; it can be a new object or a property of an existing object. 
  255.  
  256. The parameters for the Date constructor can be any of the following: 
  257.  
  258. ΓÇóNothing: creates today's date and time. For example, today = new Date() ΓÇóA string representing a date in the following form: "Month day, year hours:minutes:seconds". For example, Xmas95= new Date("December 25, 1995 13:30:00") If you omit hours, minutes, or seconds, the value will be set to zero. ΓÇóA set of integer values for year, month, and day. For example, Xmas95 = new Date(95,11,25) ΓÇóA set of values for year, month, day, hour, minute, and seconds For example, Xmas95 = new Date(95,11,25,9,30,0) 
  259.  
  260.  
  261.  
  262. To use date methods: 
  263.  
  264.  
  265. dateObj.methodName(parameters)
  266.  
  267.  
  268.  
  269.  
  270.  
  271. Exceptions: The UTC and parse methods of date are static methods that you use as follows: 
  272.  
  273.  
  274. Date.UTC(params)
  275. Date.parse(params)
  276.  
  277.  
  278.  
  279.  
  280.  
  281. Description
  282.  
  283.  
  284.  
  285. JavaScript does not have a date data type. However, the date object and its methods enable you to work with dates and times in your applications. 
  286.  
  287. The date object has a large number of methods for setting, getting, and manipulating dates. 
  288.  
  289. Properties
  290.  
  291.  
  292.  
  293. None. 
  294.  
  295. Methods
  296.  
  297. getDate getDay getHours getMinutes getMonth getSeconds getTime getTimeZoneoffset getYear parse setDate setHours setMinutes setMonth setSeconds setYear toString toGMTString toLocaleString UTC 
  298.  
  299. Event handlers
  300.  
  301.  
  302.  
  303. None. Built-in objects do not have event handlers. 
  304.  
  305. Examples
  306.  
  307.  
  308.  
  309. xxx to be supplied 
  310.  
  311. See also
  312.  
  313. xxx to be supplied 
  314. ------------------------------------------------------------------------
  315.  
  316.  
  317. document object (client)
  318.  
  319.  
  320.  
  321. The document object contains information on the current document. 
  322.  
  323. Syntax
  324.  
  325.  
  326.  
  327. To define a document object, use standard HTML syntax with the addition of the onLoad and onUnLoad event handlers: 
  328.  
  329.  
  330. <BODY
  331.    BACKGROUND="backgroundImage"
  332.    BGCOLOR="#backgroundColor"
  333.    FGCOLOR="#foregroundColor"
  334.    LINK="#unfollowedLinkColor"
  335.    ALINK="#activatedLinkColor"
  336.    VLINK="#followedLinkColor"
  337.    [onLoad="handlerText"]
  338.    [onUnLoad="handlerText"]><BODY>
  339.  
  340.  
  341.  
  342.  
  343. BGCOLOR, FGCOLOR, LINK, ALINK, and VLINK are color names or color specifications in the format "#rrggbb". 
  344.  
  345. Description
  346.  
  347.  
  348.  
  349. The <BODY>..<BODY>tag encloses an entire document, which is defined by the current URL. The entire body of the document (all other HTML elements for the document) goes within the <BODY>..<BODY>tag. 
  350.  
  351. You can reference the anchors, forms, and links of a document by using the anchors, forms, and links properties. These properties are arrays that contain an entry for each anchor, form, or link in a document. 
  352.  
  353. The document object's title property reflects the contents of <TITLE>..<TITLE> Other properties reflect the contents of the document; for example, bgColor reflects the background color, and lastModified reflects the time last modified. Some of the properties are reflections from HTML attributes; for example, the links property is a reflection of all the links in the document, and the forms property is a reflection of all the forms in the document. 
  354.  
  355. Properties
  356.  
  357. alinkColor anchors bgColor fgColor forms lastModified linkColor links loadedDate location referrer title vlinkColor 
  358.  
  359. Methods
  360.  
  361. clear close open write writeln 
  362.  
  363. Event handlers
  364.  
  365. onLoad onUnLoad 
  366.  
  367. Examples
  368.  
  369.  
  370.  
  371. xxx to be supplied 
  372.  
  373. See also
  374.  
  375. window object 
  376. ------------------------------------------------------------------------
  377.  
  378.  
  379. form object (client)
  380.  
  381.  
  382.  
  383. A form lets users input text and make choices from form objects such as checkboxes, radio buttons, and selection lists. You can also use a form to post data to or retrieve data from a server. 
  384.  
  385. Syntax
  386.  
  387.  
  388.  
  389. To define a form, use standard HTML syntax with the addition of the onSubmit event handler: 
  390.  
  391.  
  392. <FORM
  393.    NAME="objectName
  394.    TARGET="windowName"
  395.    ACTION="serverURL"
  396.    METHOD=GET | POST
  397.    [onSubmit="handlerText"]><FORM>
  398.  
  399.  
  400.  
  401.  
  402. TARGET specifies the window that form responses go to. When you submit a form with a TARGET attribute, instead of seeing the server's responses in the same window that contained the form, you see them in a (possibly new) window. 
  403. ACTION specifies the URL of the server to which form field input information is sent. 
  404. METHOD specifies how information is sent to the server specified by ACTION. GET (the default) appends the input information to the URL which on most receiving systems becomes the value of the environment variable QUERY_STRING. POST sends the input information in a data body which is available on stdin with the data length set in the environment variable CONTENT_LENGTH. 
  405.  
  406. Description
  407.  
  408.  
  409.  
  410. Each form in a document corresponds to a distinct object. 
  411.  
  412. You can reference the form objects in your code by using the forms property of the document object. The forms property is an array that contains an entry for each form in a document. 
  413.  
  414. You can reference a form's elements in your code by using the elements property. The elements property is an array that contains an entry for each element (such as a checkbox, radioButton, or text object) in a form. 
  415.  
  416. Properties
  417.  
  418. action elements method name target 
  419.  
  420. Methods
  421.  
  422. submit 
  423.  
  424. Event handlers
  425.  
  426. onSubmit 
  427.  
  428. Examples
  429.  
  430.  
  431.  
  432. xxx to be supplied 
  433.  
  434. See also
  435.  
  436. elements, forms properties 
  437. ------------------------------------------------------------------------
  438.  
  439.  
  440. history object (client)
  441.  
  442.  
  443.  
  444. The history object contains information on the URLs that the client has visited. This information is stored in a history list, and is accessible through the Navigator's Go menu. 
  445.  
  446. Syntax
  447.  
  448.  
  449.  
  450. history.go(delta)
  451.  
  452.  
  453. delta is an integer representing the offset of the destination URL in the history list. 
  454.  
  455. Description
  456.  
  457.  
  458.  
  459. The history object is a linked list of URLs the user has visited, as shown in the Navigator's Go menu. 
  460.  
  461. Properties
  462.  
  463. current length 
  464.  
  465. Methods
  466.  
  467. back forward go 
  468.  
  469. Event handlers
  470.  
  471.  
  472.  
  473. None. 
  474.  
  475. Examples
  476.  
  477.  
  478.  
  479. The following example goes to the URL the user visited three clicks ago. 
  480.  
  481. history.go(-3)
  482.  
  483.  
  484.  
  485.  
  486. See also
  487.  
  488. xxx to be supplied 
  489. ------------------------------------------------------------------------
  490.  
  491.  
  492. link object (client)
  493.  
  494.  
  495.  
  496. A link is a piece of text identified as a hypertext link. When the user clicks the link text, the link hypertext reference is loaded into its target window. 
  497.  
  498. Syntax
  499.  
  500.  
  501.  
  502. To define a link, use standard HTML syntax with the addition of the onClick and onMouseOver event handlers: 
  503.  
  504.  
  505. <A HREF=locationOrURL
  506.    TARGET="windowName"
  507.    [onClick="handlerText"]
  508.    [onMouseOver="handlerText"]>   linkText
  509. <A>
  510.  
  511.  
  512.  
  513.  
  514. HREF identifies a destination anchor or URL. 
  515. TARGET specifies the window that the link is loaded into. 
  516. linkText is rendered as a hypertext link to the URL. 
  517.  
  518. Description
  519.  
  520.  
  521.  
  522. Each link object is a location object. 
  523.  
  524. You can reference the link objects in your code by using the links property of the document object. The links property is an array that contains an entry for each link in a document. 
  525.  
  526. Properties
  527.  
  528. target 
  529.  
  530. Methods
  531.  
  532. xxx to be supplied 
  533.  
  534. Event handlers
  535.  
  536. onClick onMouseOver 
  537.  
  538. Examples
  539.  
  540.  
  541.  
  542. The following example creates a hypertext link to an anchor named javascript_intro. 
  543.  
  544.  
  545. <A HREF="#javascript_intro">Introduction to JavaScript</A>
  546.  
  547.  
  548.  
  549.  
  550.  
  551. The following example creates a hypertext link to a URL. 
  552.  
  553.  
  554. <A HREF="http://www.netscape.com">Netscape Home Page</A>
  555.  
  556.  
  557.  
  558.  
  559.  
  560. See also
  561.  
  562. anchor object links property 
  563. ------------------------------------------------------------------------
  564.  
  565.  
  566. location object (client)
  567.  
  568.  
  569.  
  570. The location object contains information on the current URL. 
  571.  
  572. Syntax
  573.  
  574.  
  575.  
  576. location.property
  577.  
  578.  
  579. property is one of the properties listed below. 
  580.  
  581. Description
  582.  
  583.  
  584.  
  585. xxx to be supplied 
  586.  
  587. Properties
  588.  
  589. hash host hostname href pathname port protocol search 
  590.  
  591. Methods
  592.  
  593. assign toString 
  594.  
  595. Event handlers
  596.  
  597.  
  598.  
  599. None. 
  600.  
  601. Examples
  602.  
  603.  
  604.  
  605. xxx to be supplied 
  606.  
  607. See also
  608.  
  609. xxx to be supplied 
  610. ------------------------------------------------------------------------
  611.  
  612.  
  613. Math object (common)
  614.  
  615.  
  616.  
  617. The built-in Math object has properties and methods for mathematical constants and functions. For example, the Math object's PI property has the value of pi. 
  618.  
  619. Syntax
  620.  
  621.  
  622.  
  623.  
  624. Math.propertyName
  625. or
  626. Math.methodName(parameters)
  627.  
  628.  
  629.  
  630.  
  631.  
  632. Description
  633.  
  634.  
  635.  
  636. You reference the constant PI as Math.PI. Constants are defined with the full precision of real numbers in JavaScript. 
  637.  
  638. Similarly, you reference Math functions as methods. For example, the sine function is Math.sin(argument), where argument is the argument. 
  639.  
  640. It is often convenient to use the with statement when a section of code uses several Math constants and methods, so you don't have to type "Math" repeatedly. For example, 
  641.  
  642.  
  643. with Math {
  644.    a = PI * r*r;
  645.    y = r*sin(theta)
  646.    x = r*cos(theta)
  647. }
  648.  
  649.  
  650.  
  651.  
  652.  
  653. Properties
  654.  
  655. E LN10 LN2 PI SQRT1_2 SQRT2 
  656.  
  657. Methods
  658.  
  659. abs acos asin atan ceil cos exp floor log max min pow random round sin sqrt tan 
  660.  
  661. Event handlers
  662.  
  663.  
  664.  
  665. None. Built-in objects do not have event handlers. 
  666.  
  667. Examples
  668.  
  669.  
  670.  
  671. xxx to be supplied 
  672.  
  673. See also
  674.  
  675. xxx to be supplied 
  676. ------------------------------------------------------------------------
  677.  
  678.  
  679. password object (client)
  680.  
  681.  
  682.  
  683. A password object is a text field on an HTML form. When the user enters text into the field, asterisks (*) hide anything entered from view. 
  684.  
  685. Syntax
  686.  
  687.  
  688.  
  689. To define a password object, use standard HTML syntax: 
  690.  
  691.  
  692. <INPUT
  693.    TYPE="password"
  694.    NAME="objectName"
  695.    [VALUE="textValue"]
  696.    SIZE=integer
  697.  
  698.  
  699.  
  700.  
  701.  
  702. Description
  703.  
  704.  
  705.  
  706. xxx to be supplied 
  707.  
  708. Properties
  709.  
  710. defaultValue name value 
  711.  
  712. Methods
  713.  
  714. focus blur select 
  715.  
  716. Event handlers
  717.  
  718.  
  719.  
  720. None. 
  721.  
  722. Examples
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729. <B>Password:</B> <INPUT TYPE="password" NAME="password" VALUE="" SIZE=25>
  730.  
  731.  
  732.  
  733.  
  734.  
  735. See also
  736.  
  737. xxx to be supplied 
  738. ------------------------------------------------------------------------
  739.  
  740.  
  741. radioButton object (client)
  742.  
  743.  
  744.  
  745. A radioButton object is a set of radio buttons on an HTML form. A set of radio buttons lets the user choose one item from a list. 
  746.  
  747. Syntax
  748.  
  749.  
  750.  
  751. To define a set of radio buttons, use standard HTML syntax with the addition of the onClick event handler: 
  752.  
  753.  
  754. <INPUT
  755.    TYPE="radio"
  756.    NAME="objectName"
  757.    VALUE="buttonValue"
  758.    [CHECKED]
  759.    [onClick="handlerText"]>   textToDisplay
  760.  
  761.  
  762.  
  763.  
  764.  
  765. NAME should contain the same value for all radio buttons in a group. 
  766.  
  767. Description
  768.  
  769.  
  770.  
  771. All radio buttons in a radio button group use the same name property. To access the individual radio buttons in your code, follow the object name with an index starting from zero, one for each button the same way you would for an array such as forms: document.forms[0].objectName[0] is the first, document.forms[0].objectName[1] is the second, etc. 
  772.  
  773. Properties
  774.  
  775. checked defaultChecked index length name value 
  776.  
  777. Methods
  778.  
  779. click 
  780.  
  781. Event handlers
  782.  
  783. onClick 
  784.  
  785. Examples
  786.  
  787.  
  788.  
  789. The following example defines a radio button group to choose among three catalogs. Each radio button is given the same name, NAME="choice", forming a group of buttons for which only one choice can be selected. The example also defines a text field that defaults to what was chosen via the radio buttons but that allows the user to type a nonstandard catalog name as well. JavaScript automatically sets the catalog name input field based on the radio buttons. 
  790.  
  791.  
  792. <INPUT TYPE="text" NAME="catalog" SIZE="20">
  793. <INPUT TYPE="radio" NAME="choice" VALUE="PRICEY"
  794.    onClick="form.catalog.value = 'top-of-the-line'"> It's really great!
  795. <INPUT TYPE="radio" NAME="choice" VALUE="MODEST"
  796.    onClick="form.catalog.value = 'middle-of-the-road'"> It's pretty good.
  797. <INPUT TYPE="radio" NAME="choice" VALUE="CHEAPO"
  798.    onClick="form.catalog.value = 'bargain-basement'"> It stinks!
  799.  
  800.  
  801.  
  802.  
  803.  
  804. See also
  805.  
  806. selection object 
  807. ------------------------------------------------------------------------
  808.  
  809.  
  810. reset object (client)
  811.  
  812.  
  813.  
  814. A reset object is a reset button on an HTML form. 
  815.  
  816. Syntax
  817.  
  818.  
  819.  
  820. To define a reset button, use standard HTML syntax with the addition of the onClick event handler: 
  821.  
  822.  
  823. <INPUT
  824.    [NAME="objectName"]
  825.    TYPE="reset"
  826.    VALUE="buttonText"
  827.    [onClick="handlerText"]>
  828.  
  829.  
  830. VALUE specifies the text to display on the button face and can be accessed using the value property. 
  831.  
  832. Description
  833.  
  834.  
  835.  
  836. A reset button resets all elements in a form to their defaults. 
  837.  
  838. Properties
  839.  
  840. name value 
  841.  
  842. Methods
  843.  
  844. click 
  845.  
  846. Event handlers
  847.  
  848. onClick 
  849.  
  850. Examples
  851.  
  852.  
  853.  
  854. The following example displays a text object containing "CA". If the user types a different state abbreviation in the text object and then clicks the Clear Form button, the original value of "CA" is restored. 
  855.  
  856.  
  857. <B>State: </B><INPUT TYPE="text" NAME="state" VALUE="CA" SIZE="2">
  858. <P><INPUT TYPE="reset" VALUE="Clear Form">
  859.  
  860.  
  861.  
  862.  
  863.  
  864. See also
  865.  
  866. button and submit objects 
  867. ------------------------------------------------------------------------
  868.  
  869.  
  870. selection object (client)
  871.  
  872.  
  873.  
  874. A selection object is a selection list or scrolling list on an HTML form. A selection list lets the user choose one item from a list. A scrolling list lets the user choose one or more items from a list. 
  875.  
  876. Syntax
  877.  
  878.  
  879.  
  880. To define a selection object, use standard HTML syntax with the addition of the onBlur, onChange, and onFocus event handlers: 
  881.  
  882.  
  883. <SELECT
  884.    NAME="objectName"
  885.    [SIZE="value"]
  886.    [MULTIPLE]
  887.    [onBlur="handlerText"]
  888.    [onChange="handlerText"]
  889.    [onFocus="handlerText"]>   <OPTION [SELECTED]>textToDisplay [ ... <OPTION>textToDisplay]
  890. <SELECT>
  891.  
  892.  
  893.  
  894.  
  895. SIZE specifies the number of options visible when the form is displayed. 
  896.  
  897. Description
  898.  
  899.  
  900.  
  901. You can reference the options of a selection object in your code by using the options property. The options property is an array that contains an entry for each option in a selection object. Each option has the properties listed below. 
  902.  
  903. The options on selection objects can be updated dynamically. xxx NYI. 
  904.  
  905. Properties
  906.  
  907.  
  908.  
  909. The selection object has the following properties: options selectedIndex 
  910.  
  911. The options property has the following properties: defaultSelected index selected text value 
  912.  
  913. Methods
  914.  
  915. click 
  916.  
  917. Event handlers
  918.  
  919. onBlur onChange onFocus 
  920.  
  921. Examples
  922.  
  923.  
  924.  
  925. The following example displays a selection list. 
  926.  
  927.  
  928. Choose the music type for your free CD:
  929. <SELECT NAME="music_type_single">
  930.    <OPTION SELECTED> R&B <OPTION> Jazz <OPTION> Blues <OPTION> New Age</SELECT>
  931. <P>Choose the music types for your free CDs:
  932. <BR><SELECT NAME="music_type_multi" MULTIPLE>
  933.    <OPTION SELECTED> R&B <OPTION> Jazz <OPTION> Blues <OPTION> New Age</SELECT>
  934.  
  935.  
  936.  
  937.  
  938.  
  939. See also
  940.  
  941. radioButton object options property 
  942. ------------------------------------------------------------------------
  943.  
  944.  
  945. string object (common)
  946.  
  947.  
  948.  
  949. A string object consists of a series of characters. 
  950.  
  951. Syntax
  952.  
  953.  
  954.  
  955. stringName.property|method
  956.  
  957.  
  958. stringName is the name of a string variable. 
  959. property is one of the properties listed below. 
  960. method is one of the methods listed below. 
  961.  
  962. Description
  963.  
  964.  
  965.  
  966. A string can be represented as a literal enclosed by single or double quotes; for example, "Netscape" or 'Netscape'. 
  967.  
  968. Properties
  969.  
  970. length 
  971.  
  972. Methods
  973.  
  974. anchor big blink bold charAt fixed fontcolor fontsize indexOf italics lastIndexOf link small strike sub substring sup toLowerCase toUpperCase 
  975.  
  976. Event handlers
  977.  
  978.  
  979.  
  980. None. Built-in objects do not have event handlers. 
  981.  
  982. Examples
  983.  
  984.  
  985.  
  986. The following statement creates a string variable. 
  987.  
  988.  
  989. var last_name = "Schaefer"
  990.  
  991.  
  992.  
  993.  
  994.  
  995. last_name.length is 8. 
  996. last_name.toUpperCase() is "SCHAEFER". 
  997. last_name.toLowerCase() is "schaefer". 
  998.  
  999. See also
  1000.  
  1001. text and textArea objects 
  1002. ------------------------------------------------------------------------
  1003.  
  1004.  
  1005. submit object (client)
  1006.  
  1007.  
  1008.  
  1009. A submit object is a submit button on an HTML form. 
  1010.  
  1011. Syntax
  1012.  
  1013.  
  1014.  
  1015. To define a submit button, use standard HTML syntax with the addition of the onClick event handler: 
  1016.  
  1017.  
  1018. <INPUT
  1019.    TYPE="submit"
  1020.    NAME="objectName"
  1021.    VALUE="buttonText"
  1022.    [onClick="handlerText"]>
  1023.  
  1024.  
  1025. VALUE specifies the text to display on the button face and can be accessed using the value property. 
  1026.  
  1027. Description
  1028.  
  1029.  
  1030.  
  1031. A submit button causes a form to be submitted. 
  1032.  
  1033. Clicking a submit button submits a form to the program specified by the form's action property. This action always loads a new page into the client; it may be the same as the current page, if the action so specifies or is not specified. 
  1034.  
  1035. Properties
  1036.  
  1037. name value 
  1038.  
  1039. Methods
  1040.  
  1041. click 
  1042.  
  1043. Event handlers
  1044.  
  1045. onClick 
  1046.  
  1047. Examples
  1048.  
  1049.  
  1050.  
  1051.  
  1052. <INPUT TYPE="submit" NAME="submit_button" VALUE="Done">
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058. See also
  1059.  
  1060. reset and button objects 
  1061. ------------------------------------------------------------------------
  1062.  
  1063.  
  1064. text object (client)
  1065.  
  1066.  
  1067.  
  1068. A text object is a text input field on an HTML form. A text field lets the user enter a word, phrase, or series of numbers. 
  1069.  
  1070. Syntax
  1071.  
  1072.  
  1073.  
  1074. To define a text object, use standard HTML syntax with the addition of the onBlur, on Change, onFocus, and onSelect event handlers: 
  1075.  
  1076.  
  1077. <INPUT
  1078.    TYPE="text"
  1079.    NAME="objectName"
  1080.    VALUE="textValue"
  1081.    SIZE=integer
  1082.    [onBlur="handlerText"]
  1083.    [onChange="handlerText"]
  1084.    [onFocus="handlerText"]
  1085.    [onSelect="handlerText"]>
  1086.  
  1087.  
  1088.  
  1089.  
  1090. Description
  1091.  
  1092.  
  1093.  
  1094. text objects can be updated dynamically by setting this.value 
  1095.  
  1096. xxx to be supplied 
  1097.  
  1098. Properties
  1099.  
  1100. defaultValue name value 
  1101.  
  1102. Methods
  1103.  
  1104. focus blur select 
  1105.  
  1106. Event handlers
  1107.  
  1108. onBlur onChange onFocus onSelect 
  1109.  
  1110. Examples
  1111.  
  1112.  
  1113.  
  1114.  
  1115. <B>Last name:</B> <INPUT TYPE="text" NAME="last_name" VALUE="" SIZE=25>
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121. See also
  1122.  
  1123. textArea and string objects 
  1124. ------------------------------------------------------------------------
  1125.  
  1126.  
  1127. textArea object (client)
  1128.  
  1129.  
  1130.  
  1131. A textArea object is a multiline input field on an HTML form. A textArea field lets the user enter words, phrases, or numbers. 
  1132.  
  1133. Syntax
  1134.  
  1135.  
  1136.  
  1137. To define a text area, use standard HTML syntax with the addition of the onBlur, onChange, onFocus, and onSelect event handlers: 
  1138.  
  1139.  
  1140. <TEXTAREA
  1141.    NAME="objectName"
  1142.    ROWS="integer"
  1143.    COLS="integer"
  1144.    [onBlur="handlerText"]
  1145.    [onChange="handlerText"]
  1146.    [onFocus="handlerText"]
  1147.    [onSelect="handlerText"]>   textToDisplay
  1148. <TEXTAREA>
  1149.  
  1150.  
  1151.  
  1152.  
  1153. textToDisplay allows only ASCII text, and new lines are respected. 
  1154. ROWS and COLS define the physical size of the displayed input field in numbers of characters. 
  1155.  
  1156. Description
  1157.  
  1158.  
  1159.  
  1160. textArea objects can be updated dynamically. xxx need to explain how. (see text object) 
  1161.  
  1162. Properties
  1163.  
  1164. defaultValue name value 
  1165.  
  1166. Methods
  1167.  
  1168. focus blur select 
  1169.  
  1170. Event handlers
  1171.  
  1172. onBlur onChange onFocus onSelect 
  1173.  
  1174. Examples
  1175.  
  1176.  
  1177.  
  1178.  
  1179. <B>Description:</B>
  1180. <BR><TEXTAREA NAME="item_description" ROWS=6 COLS=55>
  1181. Our storage ottoman provides an attractive way to
  1182. store lots of CDs and videos--and it's versatile
  1183. enough to store other things as well.
  1184.  
  1185. It can hold up to 72 CDs under the lid and 20 videos
  1186. in the drawer below.
  1187. </TEXTAREA>
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193. See also
  1194.  
  1195. text and string objects 
  1196. ------------------------------------------------------------------------
  1197.  
  1198.  
  1199. window object (client)
  1200.  
  1201.  
  1202.  
  1203. A window object is the top-level object for each document, location, and history object group. 
  1204.  
  1205. Syntax
  1206.  
  1207. xxx to be supplied 
  1208.  
  1209. Description
  1210.  
  1211.  
  1212.  
  1213. The window object is the top-level object in the JavaScript client hierarchy. Because the existence of the current window is assumed, you don't have to reference the name of the window when you call its methods and assign its properties. For example, status="Jump to a new location" is a valid property assignment, and close() is a valid method call. 
  1214.  
  1215. The self and window properties are synonyms for the current window, and you can optionally use them to refer to the current window. For example, you can close the current window by calling either window.close() or self.close(). You can use these properties to make your code more readable, or to disambiguate the property assignment self.status from a form called status. 
  1216.  
  1217. See the methods and properties listed below for more examples. 
  1218.  
  1219. You can reference a window's frame objects in your code by using the frames property. The frames property is an array that contains an entry for each frame in a window. 
  1220.  
  1221. Properties
  1222.  
  1223. frames parent self top status defaultStatus 
  1224.  
  1225. Methods
  1226.  
  1227. alert close confirm open prompt setTimeout clearTimeout 
  1228.  
  1229. Event handlers
  1230.  
  1231. onLoad onUnload 
  1232.  
  1233. Examples
  1234.  
  1235.  
  1236.  
  1237. xxx to be supplied 
  1238.  
  1239. See also
  1240.  
  1241. document object frames property 
  1242.  
  1243.